<template>
  <div class="pagination">
    <el-pagination
      background
      layout="prev, pager, next"
      :total="total"
      :current-page="currentPage"
      @current-change="currentChange"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  name: "Pagination",
  data() {
    return {
      currentPage: 1,
    };
  },
  props: ["total"],
  methods: {
      currentChange(current) {
          this.$emit("changePage",current);
      }
  }
};
</script>

<style lang="less" scoped>
.pagination {
  text-align: center;
}
</style>